<h1>Rechercher un adhérent par son nom.</h1>

<% form_tag adherents_path, :method => :get do %>
<p>
    <%= text_field_tag :search, params[:search] %>
    <%= submit_tag "Chercher" %>
</p>
<% end %>

<table>
  <tr>
		<th>Identifiant</th>
		<th>Civilité</th>
    <th>Nom</th>
		<th>Prenom</th>
	</tr>

<% for adherent in @adherents %>
  <tr>
		<td><strong><%= link_to (h adherent.id), adherent %></strong></td>
		<td><%= h adherent.civilite %></td>
    <td><strong><%= link_to (h adherent.nom), adherent %></strong></td>
    <td><%= h adherent.prenom %></td>
		
    <td><%= link_to 'Modifier', edit_adherent_path(adherent) %></td>
  </tr>
<% end %>
</table>

<br />
<%= link_to '<= Revenir', :controller => "login", :action => "index" %>



